package com.oro.domain;

import static javax.persistence.CascadeType.ALL;

import java.io.Serializable;

import javax.persistence.Entity;
import javax.persistence.JoinTable;
import javax.persistence.ManyToOne;

/**
 * Entity implementation class for Entity: ServizioAggiunto
 * 
 */
@Entity
public class ServizioAggiunto extends Servizio implements Serializable {

	private static final long serialVersionUID = 1L;
	private String currency;
	private String description;
	private String name;
	private float price;

	@ManyToOne(cascade = ALL)
	@JoinTable(name = "servizioaggiunto_sede")
	// Bi-directional
	private Sede sede;

	public ServizioAggiunto() {
		super();
	}

	@Override
	public boolean equals(Object o) {
		if (this == o)
			return true;
		if (!(o instanceof ServizioAggiunto))
			return false;
		if (getId() != null)
			return getId().equals(((ServizioAggiunto) o).getId());
		return getName() == ((ServizioAggiunto) o).getName();
	}

	public String getCurrency() {
		return currency;
	}

	public String getDescription() {
		return description;
	}

	public String getName() {
		return name;
	}

	public float getPrice() {
		return price;
	}

	public Sede getSede() {
		return sede;
	}

	public void setCurrency(String currency) {
		this.currency = currency;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public void setName(String name) {
		this.name = name;
	}

	public void setPrice(float price) {
		this.price = price;
	}

	public void setSede(Sede sede) {
		this.sede = sede;
	}
}
